Refactor planner node-type logic into node_types package#410
Merged
zhongkaifu merged 2 commits intoFeb 8, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
structure.pyto improve modularity and readability.Description
velvetflow/planner/node_types/package with modules for each node type:action.py,condition.py,data.py,loop.py,reasoning.py, andswitch.pyand a central__init__.pythat re-exports utilities.node_types/data.pyasbuild_data_node_output_schemaand loop-related helpers intonode_types/loop.py(extract_loop_body_context,validate_loop_exports,fallback_loop_exports,ensure_loop_items_fields).node_types/sanitizers.py(previously_filter_supported_params,_sanitize_builder_node_params,_sanitize_builder_node_fields) and updatedstructure.pyto import and usefilter_supported_params,sanitize_builder_node_params,sanitize_builder_node_fields, andbuild_data_node_output_schemafrom the new package.structure.py, updated call sites to the new function names, and kept existing behavior/validation logic intact.Testing
python -m compileall velvetflow/planner/structure.py velvetflow/planner/node_types, which completed successfully.python - <<'PY'\nfrom velvetflow.planner.structure import plan_workflow_structure_with_llm\nprint('ok')\nPY, which printedokindicating the planner entrypoint imports and basic wiring are functional.Codex Task